﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace proyecto
{
    /// <summary>
    /// Lógica de interacción para Window2.xaml
    /// </summary>
    public partial class changeColName : Window
    {
        bool accepted;
        string name;
        string oldName;

        public changeColName()
        {
            InitializeComponent();
        }

        public changeColName(string s)
        {
            InitializeComponent();
            //textBox1 = new TextBox();
            accepted = false;
            
            textBox1.Text = s;
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {

            //MessageBox.Show(textBox1.Text);
            name = textBox1.Text;
            accepted = true;
            this.Close();
            
        }

        public bool accept()
        {
            return accepted;
        }

        public string newName()
        {
            return name;
        }

        public string getOldName()
        {
            return oldName;
        }
    }
}
